<script setup lang='ts'>
import { ref } from 'vue';

type toDo = {
  id: number
  title: string
  finisher: boolean
}
const toDoList = ref<toDo[]>([
  { id: 1, title: '吃饭', finisher: true },
  { id: 2, title: '睡觉', finisher: false },
  { id: 3, title: '打豆豆', finisher: true }
])
</script>

<template>
  <div>
    <ul>
      <li v-for="item in toDoList" :key="item.id">
        序号:{{ item.id }},事件:{{ item.title }},是否完成:{{ item.finisher ? '完成' : '未完成' }}
      </li>
    </ul>
  </div>
</template>

<style scoped></style>